package com.bean.qq.util;

/**
 * ClassName ServiceException
 * Description TODO
 *
 * @author qq
 * @date 2025/5/6 13:42
 * @since JDK 1.8
 */
public class ServiceExceptionUtil extends  RuntimeException{
    private final ErrorCode errorCode;

    public ServiceExceptionUtil(ErrorCode errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }
    public ServiceExceptionUtil(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }

    public ServiceExceptionUtil(ErrorCode errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }


    public ErrorCode getErrorCode() {
        return errorCode;
    }
}
